package demo.controller;

import com.alibaba.fastjson.JSONObject;
import demo.pojo.*;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.web.bind.annotation.*;


import javax.servlet.http.HttpServletRequest;
import java.util.*;

/**
 * @author huangzhida
 */
@RestController
//@RequestMapping(value = "/user")
@Slf4j
public class RestfulController {

//
//  @Value("${security.oauth2.client.client-id}")
//  private String client_id;
//
//  @Value("${security.oauth2.client.reset-password-uri}")
//  private String server_url;
//
//  @Value("${security.oauth2.client.client-secret}")
//  private String client_secret;
//
//  private JdbcTemplate jdbcTemplate;
//

  //ApplicationContext app = new ClassPathXmlApplicationContext("Application.xml");

  //获取用户信息
  @GetMapping("/test_conn")
  @ResponseBody
  public String getUserInfo(HttpServletRequest request){
    DbFtech dbFtech = new DbFtech();
    dbFtech.test();
    return "gjhgjhjhghgj";
  }


}
